import { BrowserModule } from '@angular/platform-browser';
import { Routes, RouterModule } from '@angular/router';
import { HttpClientModule } from '@angular/common/http';
import { FormsModule } from '@angular/forms';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { NavbarComponent } from './navbar/navbar.component';
import { AdminCompComponent } from './admin-comp/admin-comp.component';
import { HomeCompComponent } from './home-comp/home-comp.component';
import { DetailComponent } from './detail/detail.component';

export const ROUTES: Routes = [
  { path: '', component: HomeCompComponent },
  { path: 'admin', component: AdminCompComponent },
  { path: 'detail', component: DetailComponent }
];

@NgModule({
  declarations: [
    AppComponent,
    NavbarComponent,
    AdminCompComponent,
    HomeCompComponent,
    DetailComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpClientModule,
    RouterModule.forRoot(ROUTES)
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
